<template>
	<view class="body">
		<view class="set-userinfo">
			<view class="set-userinfo-list">
				<view class="set-userinfo-list-left">头像</view>
				<view class="set-userinfo-list-right" @click="changeimage">
					<view class="set-userinfo-list-right-pic">
						<image :src="userpic" mode="aspectFill" lazy-load></image>
					</view>
				</view>
			</view>
			<view class="set-userinfo-list">
				<view class="set-userinfo-list-left">昵称</view>
				<view class="set-userinfo-list-right">
					<input class="set-userinfo-list-right-name" type="text" v-model="username" />
				</view>

			</view>
			<view class="set-userinfo-list">
				<view class="set-userinfo-list-left">手机号</view>
				<view class="set-userinfo-list-right">
					<input class="set-userinfo-list-right-name" type="text" v-model="mobilePhone" />
				</view>

			</view>
			<button class="button" type="default" @click="submit">完成</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userpic: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2Fbf6fe5f0-4e5c-4dd1-9545-f58151164f0c%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1688030544&t=0eb95982f55004824ffbd3cd0aedd1f9",
				username: "自来也",
				mobilePhone: 13722379809,
			}
		},
		computed: {
			startDate() {
				return this.getDate('start');
			},
			endDate() {
				return this.getDate('end');
			}
		},
		methods: {
			onConfirm(e) {
				this.pickerText = JSON.stringify(e.label)
				console.log(this.pickerText);
			},
			changeimage() {
				uni.chooseImage({
					count: 1, //默认9
					sizeType: ['compressed'], //压缩图
					success: (res) => {
						console.log(JSON.stringify(res.tempFilePaths));
						this.userpic = res.tempFilePaths
					}
				});
			},
			bindDateChange: function(e) {
				this.birthday = e.detail.value
			},
			submit() {

			}

		}
	}
</script>

<style lang="scss" scoped>
	page {
		background-color: white;
		font-weight: bolder;
	}


	.body {
		margin: 20rpx 25rpx;


		.set-userinfo {
			border-top: 1rpx solid #F2F2F2;

			.set-userinfo-list {
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding: 10rpx 25rpx;
				border-bottom: 1rpx solid #F2F2F2;

				.set-userinfo-list-left {
					font-size: 30rpx;
					color: #989898;
					font-weight: 500;
				}

				.set-userinfo-list-right {
					display: flex;
					justify-content: center;
					align-items: center;

					.set-userinfo-list-right-pic {
						width: 90rpx;
						height: 90rpx;

						image {
							width: 100%;
							height: 100%;
							border-radius: 100%;
						}
					}

					.set-userinfo-list-right-name {
						display: flex;
						align-items: center;
						font-size: 30rpx;

						text-align: right;
					}

					.set-userinfo-list-right-icon {
						font-size: 45rpx;
						color: #989898;
						margin-left: 30rpx;
					}
				}
			}

			.button {
				margin-top: 30rpx;
				width: 95%;
				background-color: #007aff;
				font-size: 30rpx;
				color: #ffffff;
				border: 0;
			}
		}

	}
</style>